package com.zhanbo.zhanbowymusic.main.mine.recently;

import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;

import com.mwx.baselib.base.BaseFragment;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.FragmentRecentlyAlbumLikeBinding;
import com.zhanbo.zhanbowymusic.main.mine.recently.adapter.AlbumRecentlyListAdapter;
import com.zhanbo.zhanbowymusic.main.mine.recently.adapter.SongListRecentlyListAdapter;

import java.util.ArrayList;
import java.util.List;

public class AlbumRecentlyFragment extends BaseFragment<FragmentRecentlyAlbumLikeBinding> {
    @Override
    protected Object getLayout() {
        return R.layout.fragment_recently_album_like;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        initData();
        initView();
        initListener();
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        List<Integer> stringList = new ArrayList<>();
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        binding.recyclerRecentlyAlbum.setLayoutManager(new LinearLayoutManager(_mActivity,LinearLayoutManager.VERTICAL,false));
        AlbumRecentlyListAdapter albumRecentlyListAdapter = new AlbumRecentlyListAdapter(_mActivity);
        albumRecentlyListAdapter.getItems().addAll(stringList);
        binding.recyclerRecentlyAlbum.setAdapter(albumRecentlyListAdapter);
    }

    @Override
    protected void initListener() {

    }

    public static AlbumRecentlyFragment newInstance() {

        Bundle args = new Bundle();

        AlbumRecentlyFragment fragment = new AlbumRecentlyFragment();
        fragment.setArguments(args);
        return fragment;
    }
}
